﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace XYX.Http.Mvc
{
    /// <summary>
    /// 方法描述
    /// </summary>
    public class ActionDescriptor : Clone
    {
        /// <summary>
        /// 方法名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 方法
        /// </summary>
        public MethodInfo Member { get; set; }
        /// <summary>
        /// 方法的参数
        /// </summary>

        public ParameterInfo[] Parameters { get; set; }
       
        /// <summary>
        /// 返回的值
        /// </summary>
        public object Value { get; internal set; }
     
        /// <summary>
        /// 重写
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return this.Value?.ToString();
        }
        /// <summary>
        /// 特性集合
        /// </summary>
        public IActionAttribute[] Attributes { get; set; }

        public object Clone()
        {
          
            return Copy(this);

        }
    }
}
